w#include "Area.cpp"

#include "tanaman.h"
#include "ganja.h"
#include "coca.h"
#include "mushroom.h"
#include "tobacco.h"
#include "opium.h"
#include "anggur.h"

#include <list>

int main() {
	AllMap TES;
	LField Tes[8][8];
	int i,j;
	int f[8][10];
	cout << (Tes[3][3].GetPlant())->getID() << endl;
	(TES.GetLFieldXY(2,2))->SetPlantable(1);
	cout << ((TES.GetLFieldXY(2,2))->IsPlantable()) << endl;
	cout << "ISCANGKUL?" << ((TES.GetLFieldXY(2,2))->IsCangkul()) << endl;
	cout << "GETCOND?" << (TES.GetXYCond(2,2)) << endl;
	((TES.GetLFieldXY(2,2))->Kerja('c'));
	((TES.GetLFieldXY(2,2))->Kerja('1'));
	cout << "BARUSAN ANE CANGKUL TRUS TANEM GANJA!" << endl;
	cout << "GETCOND AFTER?" << (TES.GetXYCond(2,2)) << endl;
	cout << "GETCANGKUL AFTER?" << ((TES.GetLFieldXY(2,2))->IsCangkul()) << endl;
	cout << "INFO TANAMAN?" << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getID() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getUmur() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getHappyMeter() << endl;
	cout << "MISALNYA HARI BERIKUTNYA TANPA DISIRAM..." << endl;
	(TES.GetLFieldXY(2,2))->Sync();
	cout << "INFO TANAMAN?" << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getID() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getUmur() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getHappyMeter() << endl;
	cout << "SEKARANG COBA DISIRAM!" << endl;
	(TES.GetLFieldXY(2,2))->SetSiram(1);
	cout << "NE BUKTINYA : " << ((TES.GetLFieldXY(2,2))->IsPlantable()) << endl;
	cout << "SEKARANG KONDISI DIA : " << ((TES.GetLFieldXY(2,2))->GetCond()) << endl;
	(TES.GetLFieldXY(2,2))->Sync();
	cout << "INFO TANAMAN?" << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getID() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getUmur() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getHappyMeter() << endl;
	cout << "BERHUBUNG INI HARI BERIKUTNYA..." << endl << "HARUSNYA SIRAMNYA 0 LAGI! : " << ((TES.GetLFieldXY(2,2))->IsSiram()) << endl;
	cout << "SKARANG SIRAM LAGI!" << endl;
	((TES.GetLFieldXY(2,2))->SetSiram(1));
	cout << "SIRAM : " << ((TES.GetLFieldXY(2,2))->IsPlantable()) << endl;
	cout << "SEKARANG KONDISI DIA : " << ((TES.GetLFieldXY(2,2))->GetCond()) << endl;
	cout << "COBA SINKRONISASI PAKAI ALLMAP!" << endl;
	TES.SyncAll();
	cout << "INFO TANAMAN?" << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getID() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getUmur() << endl;
	cout << ((TES.GetLFieldXY(2,2))->GetPlant())->getHappyMeter() << endl;
	cout << "WOWOWOW" << endl;
	cout << "ISENG AH COBA KONVPRINT!" << endl;
	TES.KonvPrint(0,f);
	cout << f[2][2] << endl;
	cout << "PALING DEKET = " << (TES.GetFieldwProp(0))->GetCond() << endl;
	return 0;
}
